package com.lipiao.traveltreasure.service.impl.restaurant;

import com.lipiao.traveltreasure.bean.restaurantBean.Food;
import com.lipiao.traveltreasure.dao.restaurant.AdminMapper;
import com.lipiao.traveltreasure.dao.restaurant.CommonMapper;
import com.lipiao.traveltreasure.service.restaurant.CommonService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class CommonServiceImpl implements CommonService {

    //注入Mapper接口对象
    @Resource
    private CommonMapper commonMapper;

    @Override
    public List<Food> queryAllFood() {
        return commonMapper.queryAllFood();
    }

    @Override
    public Food queryFoodById(String id) {
        return commonMapper.queryFoodById(id);
    }

    @Override
    public List<Food> queryFoodByType(int type) {
        return commonMapper.queryFoodByType(type);
    }
}
